package com.java.huxb.day03;

import com.java.huxb.day03.entity.Apple;
import com.java.huxb.day03.entity.Student;
import com.java.huxb.day03.utils.AppleUtil;
import com.java.huxb.day03.utils.SetUserNameUtil;
import com.java.huxb.day03.utils.StudentUtils;

import java.util.List;

/**
 * @author huxb
 * @date 2020/3/3 0003 下午 8:46
 */
public class day03 {
    public static void main(String[] args) {
        List<Student> studentList = StudentUtils.getStudentList();
        SetUserNameUtil.setUserName(studentList, "getId", "setStudentName");
        for (Student student : studentList) {
            System.out.println(student.getStudentName());
        }

        List<Apple> appleList = AppleUtil.getAppleList();
        SetUserNameUtil.setUserName(appleList, "getAppleId", "setAppleName");

        for (Apple apple : appleList) {
            System.out.println(apple.getAppleName());
        }
    }
}
